package frame;

import java.awt.Container;

import javax.swing.JFrame;
import javax.swing.JTabbedPane;

import pnlAfhaal.PnlAfhaalMain;
import pnlMain.PnlWelkom;
import pnlRestaurant.PnlResMain;

public class FrameMain extends JFrame{

	/**
	 * 
	 */
	private static final long serialVersionUID = -4763346649813117739L;

	private Container window = getContentPane();
	
	private PnlResMain prm;
	private JTabbedPane tp;
	private PnlWelkom pw;
	private PnlResMain pr;
	private PnlAfhaalMain pa;
	
	public FrameMain() {
		initGUI();
	}
	
	public void initGUI(){
		
		setTitle("MainFrame with a Panel");
		setExtendedState(MAXIMIZED_BOTH);
		setUndecorated(true);
		setLayout(null);
		
		tp = new JTabbedPane();
		tp.setBounds(0, 0, 1367,800);
		tp.setVisible(true);
		window.add(tp);
		
		pw = new PnlWelkom();
		pw.setVisible(true);
		tp.addTab("<html><body leftmargin=20 topmargin=20 marginwidth=165 marginheight=2><h1><b> Da-Xin </b></h1></body></html>", pw);
		
		pr = new PnlResMain();
		pr.setVisible(true);
		tp.addTab("<html><body leftmargin=20 topmargin=20 marginwidth=166 marginheight=2><h1><b> Restaurant </b></h1></body></html>", pr);
		
		pa = new PnlAfhaalMain();
		pa.setVisible(true);
		tp.addTab("<html><body leftmargin=20 topmargin=20 marginwidth=166 marginheight=2><h1><b> Afhaal </b></h1></body></html>", pa);
		
		
		prm = new PnlResMain();
		prm.setBounds(0, 0, 1367,800);
		prm.setVisible(false);
		window.add(prm);
		
		validate();
	}
	public PnlResMain getprm(){
		return prm;
	}
}
